package com.atguigu.service.impl;

import com.atguigu.bean.Book;
import com.atguigu.dao.BookDao;
import com.atguigu.dao.impl.BookDaoImpl;
import com.atguigu.service.BookService;

import java.util.List;

public class BookServiceImpl implements BookService {
  private   BookDao bookDao = new BookDaoImpl();
    @Override
    public boolean saveBook(Book book) {
      return bookDao.saveBook(book);
    }

  /**
   * 查询全部信息
   * @return
   */
  @Override
  public List<Book> findAllBook() {
    return bookDao.findAllBook();
  }

  @Override
  public void deleteBookById(String id) {
    bookDao.deleteBookById(id);
  }

  @Override
  public Book selectBookById(String id) {
    return bookDao.selectBookById(id);
  }


  @Override
  public void updateBookById(Book book) {
    bookDao.updateBookById(book);
  }


}
